package com.tiancheng.trade.merchant.feign;

import com.tiancheng.trade.commom.core.data.Result;
import com.tiancheng.trade.merchant.exception.BusinessException;
import com.tiancheng.trade.merchant.feign.hystrix.SettlementRuleFeignService;
import com.tiancheng.trade.merchant.vo.product.OpenDeleteProductVO;
import com.tiancheng.trade.merchant.vo.product.SettlementRuleVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "trade-settlement/api/settlementrule", fallback = SettlementRuleFeignService.class)
public interface ISettlementRuleFeignService {

    @GetMapping("/findSettlementRuleList")
    Result<List<SettlementRuleVO>> findSettlementRuleList(@RequestParam("product_code") String productCode,@RequestParam("settlement_status")String settlementStatus) throws BusinessException;

    @PostMapping("/updateMerchantName")
    Result<?> updateMerchantName(@RequestBody SettlementRuleVO settlementRuleVO) throws BusinessException;

    @PostMapping("/openDeleteRule")
    Result<?> openDeleteRule(@RequestBody OpenDeleteProductVO productVO) throws BusinessException;

}
